﻿using System;
using UnityEngine;

// Token: 0x020002DE RID: 734
public class SpaceScript : MonoBehaviour
{
	// Token: 0x06001105 RID: 4357 RVA: 0x0007DE3D File Offset: 0x0007C03D
	private void Start()
	{
		this.spaceSounds = Resources.LoadAll<AudioClip>("Sound/Space");
		this.audioSource = base.gameObject.AddComponent<AudioSource>();
		this.audioSource.outputAudioMixerGroup = SoundManager.mg_background;
		SoundManager.SetUpAmbientAudioSource(this.audioSource);
	}

	// Token: 0x06001106 RID: 4358 RVA: 0x0007DE7C File Offset: 0x0007C07C
	private void Update()
	{
		this.audioSource.volume = SoundManager.ambientVolume * 0.5f;
		if (!this.audioSource.isPlaying)
		{
			this.audioSource.clip = SoundManager.GetRandomClip(this.spaceSounds);
			this.audioSource.Play();
		}
	}

	// Token: 0x04001665 RID: 5733
	private AudioSource audioSource;

	// Token: 0x04001666 RID: 5734
	private AudioClip[] spaceSounds;
}
